package cn.lanchengkeji.datafillingsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author Yixu
 * @since 2018-11-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("train_users")
@ApiModel(value = "Users对象", description = "用户")
public class Users extends Model<Users> {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "用户类型 0 管理端  1用户端")
    private Integer userType;

    @ApiModelProperty(value = "密码")
    private String passwd;

    @ApiModelProperty(value = "真实姓名")
    private String realName;

    @ApiModelProperty(value = "电话")
    private String tel;

    @ApiModelProperty(value = "邮箱")
    private String mail;

    @ApiModelProperty(value = "地区码")
    private String areaCode;

    @ApiModelProperty(value = "逻辑删除标志")
    @TableLogic
    private Integer delFlag;

    @ApiModelProperty(value = "家庭地址")
    private String familyAddress;

    @ApiModelProperty(value = "小组id")
    private String organization;

    @ApiModelProperty(value = "部门名称")
    private String department;

    @ApiModelProperty(value = "年龄")
    private Integer age;

    @ApiModelProperty(value = "性别")
    private Integer sex;

    @ApiModelProperty(value = "政治面貌x")
    private String politicsStatus;

    @ApiModelProperty(value = "审核")
    private Integer checkFlag;

    @ApiModelProperty(value = "职务x")
    private String duty;

    @ApiModelProperty(value = "出生日期x")
    private String dateBirth;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;


    public static final String ID = "id";

    public static final String USER_NAME = "user_name";

    public static final String USER_TYPE = "user_type";

    public static final String PASSWD = "passwd";

    public static final String REAL_NAME = "real_name";

    public static final String MAIL = "mail";

    public static final String TEL = "tel";

    public static final String AREA_CODE = "area_code";

    public static final String DEL_FLAG = "del_flag";

    public static final String FAMILY_ADDRESS = "family_address";

    public static final String ORGANIZATION = "organization";

    public static final String DEPARTMENT = "department";

    public static final String AGE = "age";

    public static final String SEX = "sex";

    public static final String POLITICS_STATUS = "politics_status";

    public static final String CHECK_FLAG = "check_flag";

    public static final String DUTY = "duty";

    public static final String DATE_BIRTH = "date_birth";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
